﻿using System.Diagnostics;
using System.Web.Mvc;
using ALinq.BBS.DataAccess;
using System.Web;

public static class RouteNames
{
    public const string EditReply = "EditReply";
    public const string EditPost = "EditPost";
    public const string PostList = "PostList";
    public const string Post = "Post";
    public const string Home = "Home";
    public const string Index = "Index";
    public const string Message = "Message";
    public const string DeletePost = "DeletePost";
    public const string DeleteReply = "DeleteReply";
    public const string Topic = "Topic";

    public const string Default = "Default";
}

public static class Helper
{
    public static string ArticleIcon(this WebViewPage page, IArticle article)
    {
        var post = article as Post;
        if (post != null)
            switch (post.Type)
            {
                default:
                    return UrlHelper.GenerateContentUrl("~/Content/Images/PostIcon/NormalPost.gif", page.Context);
            }

        Debug.Assert(article is Reply);
        return UrlHelper.GenerateContentUrl("~/Content/Images/PostIcon/NormalPost.gif", page.Context);
    }
}